<?php
namespace GRH;

class Module
{
    public function getAutoloaderConfig()
    {
        return array(
            'Zend\Loader\ClassMapAutoloader' => array(
                __DIR__ . '/autoload_classmap.php',
            ),
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                ),
            ),
        );
    }
    
    public function getConfig()
    {
        return include __DIR__ . '/config/module.config.php';
    }
    
    public function getServiceConfig()
    {
        return array(
            'factories' => array(
                'GRH\Model\Table\PeriodeTable' => function($sm){
                    return new Model\Table\PeriodeTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\Table\SemaineTable' => function($sm){
                    return new Model\Table\SemaineTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\Table\PeriodeDetailsTable' => function($sm){
                    return new Model\Table\PeriodeDetailsTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\Table\PlanningTable' => function($sm){
                    return new Model\Table\PlanningTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\Table\DisponibiliteTable' => function($sm){
                    return new Model\Table\DisponibiliteTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\Table\EmployeTable' => function($sm){
                    return new Model\Table\EmployeTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\Table\SiteTable' => function($sm){
                    return new Model\Table\SiteTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\Table\CodeActiviteTable' => function($sm){
                    return new Model\Table\CodeActiviteTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\Table\CouleurTable' => function($sm){
                    return new Model\Table\CouleurTable($sm->get('Zend\Db\Adapter\Adapter'));
                },
                'GRH\Model\View\CodeActiviteView' => function($sm){
                    return new Model\View\CodeActiviteView($sm->get('Zend\Db\Adapter\Adapter'));
                },
            ),
        );
    }
}